#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import os
from redis import Redis

BASEDIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))

DEBUG = True
SECRET_KEY = 'alflxjklwelropnona'
# mysql://username:password@hostname/database
SQLALCHEMY_DATABASE_URI = 'mysql://test:test@192.168.9.224/firewall'
# SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(os.path.join(BASEDIR, 'data.sqlite'))
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = True

# 导航栏分页 - 每页显示多少行数据，
limit = 10

# session redis
conn = Redis(host='192.168.9.224', port=6379, password='xiong123', db=3)
SESSION_TYPE = "redis"
SESSION_KEY_PREFIX = "flask_"
SESSION_REDIS = conn